{php}
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=daftar_pin.xls");
header("Pragma: no-cache");
header("Expires: 0");
{/php}

<table>
	<thead>
					<tr>
						<th>No</th>
						<th>Pin ID</th>
						<th>Pin</th>
						<th>Status</th>
		</tr>
	</thead>
	
	<tbody>

			{if $data.rows}
				{foreach name=data  from=$data.rows item=i}	
					<tr>
						<td>{$smarty.foreach.data.iteration + $data.offset}</td>
						<td>{$i.pinID}</td>
						<td>{$i.pin}</td>
						<td>{$i.state}</td>
					</tr>
				{/foreach}
			{/if}
	</tbody>
</table>